/*
 * @Author:
 * @Date: 2023-06-27 10:52:46
 * @LastEditors:
 * @LastEditTime: 2023-07-15 18:17:42
 * @FilePath: \immoka-admin\src\api\sunGame\sunGame.js
 * @Description:
 *
 * Copyright (c) 2023 by ${git_name} , All Rights Reserved.
 */
import request from '@/utils/request'

// 奖励列表
export function listData(query) {
    return request({
        url: '/api/garden/prize/list',
        method: 'get',
        params: query
    })
}
// 编辑奖励
export function prizeEdit(query) {
    return request({
        url: '/api/garden/prize/edit',
        method: 'post',
        data: query
    })
}
// 添加奖励
export function prizeAdd(query) {
    return request({
        url: '/api/garden/prize/add',
        method: 'post',
        data: query
    })
}
// 删除奖励
export function prizeDeleted(query) {
    return request({
        url: '/api/garden/prize/deleted',
        method: 'post',
        data: query
    })
}



// 碎片列表
export function chipList(query) {
    return request({
        url: '/api/garden/chip/list',
        method: 'get',
        params: query
    })
}
// 编辑碎片
export function chipEdit(query) {
    return request({
        url: '/api/garden/chip/edit',
        method: 'post',
        data: query
    })
}
// 新增碎片
export function chipAdd(query) {
    return request({
        url: '/api/garden/chip/add',
        method: 'post',
        data: query
    })
}
// 删除碎片
export function chipDel(query) {
    return request({
        url: 'api/garden/chip/del',
        method: 'put',
        data: query
    })
}

// 宝箱列表
export function boxList(query) {
    return request({
        url: '/api/garden/box/list',
        method: 'get',
        params: query
    })
}
// 添加宝箱奖励
export function boxAdd(query) {
    return request({
        url: '/api/garden/box/add',
        method: 'post',
        data: query
    })
}
// 编辑宝箱奖励
export function boxEdit(query) {
    return request({
        url: '/api/garden/box/edit',
        method: 'post',
        data: query
    })
}
// 批量编辑宝箱奖励
export function boxBatch(query) {
    return request({
        url: '/api/garden/box/batch',
        method: 'post',
        data: query
    })
}
// 删除宝箱奖励
export function boxDel(query) {
    return request({
        url: '/api/garden/box/del',
        method: 'put',
        data: query
    })
}
// 替换宝箱
export function boxReplace(query) {
    return request({
        url: '/api/garden/box/replace',
        method: 'put',
        data: query
    })
}

// 奖励下拉数据
export function productList(params) {
    return request({
      url: "/mall/product/list",
      method: "get",
      params
    });
}

// 奖励升级/终极奖励详情页
/**
 *
 * @param {params}  type: 1=升级奖励   2=终极奖励
 * @returns
 */
export function upgradeInfo(params) {
    return request({
      url: "/api/garden/upgrade/info",
      method: "get",
      params
    });
}
// 奖励升级/终极奖励详情页---编辑碎片信息
export function upgradeChip(params) {
    return request({
      url: "/api/garden/upgrade/chip",
      method: "post",
      data: params
    });
}
// 奖励升级/终极奖励详情页---编辑奖励
export function upgradeEdit(params) {
    return request({
      url: "/api/garden/upgrade/edit",
      method: "post",
      data: params
    });
}
// 奖励升级/终极奖励详情页---添加奖励
export function upgradeAdd(params) {
    return request({
      url: "/api/garden/upgrade/add",
      method: "post",
      data: params
    });
}
// 奖励升级/终极奖励详情页---删除/禁启用奖励
/**
 *
 * @param {id, type: 0=删除   1=禁启用} params
 * @returns
 */
export function upgradeChange(params) {
    return request({
      url: "/api/garden/upgrade/change",
      method: "post",
      data: params
    });
}

/***
 *
 * 碎片兑换奖励列表
 */
export function chipExchangeList(params) {
    return request({
      url: "/api/garden/chip-exchange/list",
      method: "get",
      params: params
    });
}
// 添加碎片兑换奖励
export function chipExchangeAdd(params) {
    return request({
      url: "/api/garden/chip-exchange/add",
      method: "post",
      data: params
    });
}
// 编辑碎片兑换奖励
export function chipExchangeEdit(params) {
    return request({
      url: "/api/garden/chip-exchange/edit",
      method: "post",
      data: params
    });
}
// 禁启用/删除碎片兑换奖励
/**
 *
 * @param {id; type: 0=删除   1=禁启用} params
 * @returns
 */
export function chipExchangeChange(params) {
    return request({
      url: "/api/garden/chip-exchange/change",
      method: "post",
      data: params
    });
}

// 数据面板列表
export function poolDrawList(params) {
    return request({
      url: "/api/garden/pool/draw/list",
      method: "get",
      params: params
    });
}
// 数据面板 - 数据统计
export function poolStatistics(params) {
    return request({
      url: "/api/garden/pool/statistics",
      method: "get",
      params: params
    });
}

// 奖励配置列表
export function poolPrizeList(params) {
    return request({
      url: "/api/garden/pool/prize/list",
      method: "get",
      params: params
    });
}
// 奖励配置 - 添加奖池
export function poolPrizeAdd(params) {
    return request({
      url: "/api/garden/pool/prize/add",
      method: "post",
      data: params
    });
}
// 奖励配置 - 编辑奖池

export function poolPrizeEdit(params) {
    return request({
      url: "/api/garden/pool/prize/edit",
      method: "post",
      data: params
    });
}
// 奖励配置 - 删除
export function poolPrizeDeleted(params) {
    return request({
      url: "/api/garden/pool/prize/deleted",
      method: "post",
      data: params
    });
}
// 奖励配置 - 替换新奖池
export function poolPrizeReplace(params) {
    return request({
      url: "/api/garden/pool/prize/replace",
      method: "post",
      data: params
    });
}
// 奖励配置 - 批量更新库存
export function poolPrizeEditStock(params) {
    return request({
      url: "/api/garden/pool/prize/edit/stock",
      method: "post",
      data: params
    });
}
// 奖励配置-下期 - 列表
export function poolTemplatePrizeList(params) {
    return request({
      url: "/api/garden/pool/template/prize/list",
      method: "get",
      params: params
    });
}
// 奖励配置-下期 - 添加奖池
export function poolTemplatePrizeAdd(params) {
    return request({
      url: "/api/garden/pool/template/prize/add",
      method: "post",
      data: params
    });
}
// 奖励配置-下期 - 编辑
export function poolTemplatePrizeEdit(params) {
    return request({
      url: "/api/garden/pool/template/prize/edit",
      method: "post",
      data: params
    });
}
// 奖励配置-下期 - 删除
export function poolTemplatePrizeDeleted(params) {
    return request({
      url: "/api/garden/pool/template/prize/deleted",
      method: "post",
      data: params
    });
}
// 奖励配置-下期 - 批量更新库存
export function poolTemplatePrizeEditStock(params) {
    return request({
      url: "/api/garden/pool/template/prize/edit/stock",
      method: "post",
      data: params
    });
}

// 兑换记录
export function exchangeLog(params) {
    return request({
      url: "/api/garden/exchange/log",
      method: "get",
      params: params
    });
}


// 导出
export function poolDrawExport(params) {
    return request({
      url: "/api/garden/pool/draw/export",
      method: "get",
      params: params
    });
}

// 兑换奖励的数据统计
export function exchangeStatistics(params) {
    return request({
      url: "/api/garden/exchange/statistics",
      method: "get",
      params: params
    });
}
